package org.jeecg.modules.ywEndFinishedProductEnter.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.jeecg.constant.CommonConstant;
import org.jeecg.modules.ywEndFinishedProductEnter.entity.YwEndFinishedProductEnterDetail;
import org.jeecg.modules.ywEndFinishedProductEnter.mapper.YwEndFinishedProductEnterDetailMapper;
import org.jeecg.modules.ywEndFinishedProductEnter.service.IYwEndFinishedProductEnterDetailService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description: 完成品入库-详情
 * @Author: jeecg-boot
 * @Date: 2024-08-20
 * @Version: V1.0
 */
@Service
public class YwEndFinishedProductEnterDetailServiceImpl extends ServiceImpl<YwEndFinishedProductEnterDetailMapper, YwEndFinishedProductEnterDetail> implements IYwEndFinishedProductEnterDetailService {

    @Resource
    private YwEndFinishedProductEnterDetailMapper ywEndFinishedProductEnterDetailMapper;

    @Override
    public List<YwEndFinishedProductEnterDetail> selectByMainId(String mainId) {
        return ywEndFinishedProductEnterDetailMapper.selectByMainId(mainId);
    }

    @Override
    public List<YwEndFinishedProductEnterDetail> selectList(String enterId) {
        QueryWrapper<YwEndFinishedProductEnterDetail> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("enter_id", enterId);
        queryWrapper.eq("status", CommonConstant.StatusEnum.YES.getCode());
        return ywEndFinishedProductEnterDetailMapper.selectList(queryWrapper);
    }

}
